package com.ruoyi.xiaoshou.api;

import com.ruoyi.common.core.constant.SecurityConstants;
import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.xiaoshou.domain.SaleBackRequest;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author 罗梦杰
 * date 2024/11/7 13:50
 * @version 1.0
 */
@FeignClient(contextId = "RemoteSaleBackRequestService", value = ServiceNameConstants.XIAOSHOU_SERVICE)
public interface RemoteSaleBackRequestService {
    @PostMapping("/saleBackRequest/getSaleBackRequestListBySaleOutCode")
    R<List<SaleBackRequest>> getSaleBackRequestListBySaleOutCode(@RequestBody String saleOutCode);

    @GetMapping("/saleBackRequest/getSaleBackRequestByCode/{code}")
    R<SaleBackRequest> getSaleBackRequestByCode(@PathVariable("code") String code, @RequestHeader(SecurityConstants.FROM_SOURCE)String source);

    @PostMapping("/saleBackRequest/updSaleBackRequestByCode")
    R<String> updSaleBackRequestByCode(@RequestBody SaleBackRequest saleBackRequest);
}
